package com.ly.bean;

import java.io.Serializable;

/**
 * @author 李岩
 * @date 2021/12/7-15:34
 * @describe
 */
public class Result implements Serializable {
    private boolean code;//true 为成功
    private int status;//200 成功  其他失败
    private String msg;//返回的消息  可以使用  不能使用
    private Object obj;//结果

    public static Result getResult(boolean code,int status,String msg,Object obj){
        Result result = new Result();
        result.code=code;
        result.status=status;
        result.msg=msg;
        result.obj=obj;
        return result;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", status=" + status +
                ", msg='" + msg + '\'' +
                ", obj=" + obj +
                '}';
    }

    public boolean isCode() {
        return code;
    }

    public void setCode(boolean code) {
        this.code = code;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }
}
